'\" te
.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MCONNECT 1 "Jan 28, 2008"
.SH NAME
mconnect \- connect to SMTP mail server socket
.SH SYNOPSIS
.LP
.nf
\fBmconnect\fR [\fB-p\fR \fIport\fR] [\fB-r\fR] [\fIhostname\fR]
.fi

.SH DESCRIPTION
.sp
.LP
The \fBmconnect\fR utility opens a connection to the mail server on a given
host, so that it can be tested independently of all other mail software. If no
host is given, the connection is made to the local host. Servers expect to
speak the Simple Mail Transfer Protocol (\fBSMTP\fR) on this connection. Exit
by typing the \fBquit\fR command. Typing \fBEOF\fR sends an end of file to the
server. An interrupt closes the connection immediately and exits.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-p\fR\fIport\fR\fR
.ad
.RS 10n
Specify the port number instead of the default \fBSMTP\fR port (number 25) as
the next argument.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 10n
\fBRaw\fR mode: disable the default line buffering and input handling. This
produces an effect similar to  \fBtelnet\fR(1) to port number 25.
.RE

.SH OPERANDS
.sp
.LP
The following operand is supported:
.sp
.ne 2
.na
\fB\fIhostname\fR\fR
.ad
.RS 12n
The name of a given host.
.RE

.SH USAGE
.sp
.LP
The \fBmconnect\fR command is IPv6-enabled. See \fBip6\fR(4P).
.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/mail/sendmail.hf\fR\fR
.ad
.RS 25n
Help file for \fBSMTP\fR commands
.RE

.SH SEE ALSO
.sp
.LP
.BR telnet (1),
.BR ip6 (4P),
.BR attributes (7),
.BR sendmail (8)
.sp
.LP
Postel, Jonathan B., \fIRFC 821, Simple Mail Transfer Protocol\fR,  Information
Sciences Institute, University of Southern California, August 1982.
